import request from '@/config/axios'

// 查询标签详情
export const list = async (params) => {
  return await request.get({ url: '/label/list', params})
}

// 查询标签详情
export const ruleList = async (params) => {
  return await request.get({ url: '/label/rule/list', params})
}

// 创建标签
export const create = async (params) => {
  return await request.post({ url: '/label/create', params})
}

// 创建标签规则
export const createRule = async (params) => {
  return await request.post({ url: '/label/rule/create', params})
}
// 修改标签规则
export const updateRule = async (params) => {
  return await request.post({ url: '/label/rule/update', params})
}

// 查看标签详情
export const selectRuleOne = async (id) => {
  return await request.get({ url: '/label/rule/one/' + id})
}


// 创建标签
export const update = async (params) => {
  return await request.post({ url: '/label/update', params})
}

// 查看标签详情
export const selectOne = async (id) => {
  return await request.get({ url: '/label/one/' + id})
}

export const remove = async (id) => {
  return await request.get({ url: '/label/delete/' + id})
}

export const removeRule = async (id) => {
  return await request.get({ url: '/label/rule/delete/' + id})
}
